<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>修改订单</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css">
<!--公共样式结束-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/module_form.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_memberAdd.css">
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.timer.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/common.js"></script>
<script src="__PUBLIC__/Plugins/Datepicker/WdatePicker.js"></script>
<style>
.attr{
	margin-left:30px;
}
.editbtn{
	background-color:#339900;
	color:#FFFFFF;
	padding:2px 4px;
	cursor:pointer;
}
.entitle{
	font-size:16px;
	font-weight:bold;
}
.attr_list{
	background-color:green;
	margin-right:5px;
	color:#FFFFFF;
}
</style>
</head>

<body>
	<div class="page_header">
		<div class="tabbar">
			<ul class="tab clearfix" tabname="tab1">
				<li class="tabhover" show="tab1_0">配送信息</li>
				<li show="tab1_1">商品信息</li>
			</ul>
		</div>
	</div>
	<div class="page_wraper">
	<form method="post" id="restaurantAdd_form">
		<input type="hidden" id="solevar" name="solevar" value="{:create_id()}">
		<div id="tab1_0" fortab="tab1">
			<table cellpadding="0" cellspacing="0" class="module_form" width="600">
				<tr>
					<td class="ele_title"><label for="cardnum">收货人：<em>*</em></label></td>
					<td class="ele_content" colspan="3">
						<input name="username" value="{$detail.username}" type="text" id="title" class="form_ele_text width_200">
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="cardnum">电话：<em>*</em></label></td>
					<td class="ele_content" colspan="3">
						<input name="mobile" value="{$detail.mobile}" type="text" id="entitle" class="form_ele_text width_200">
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="realname">收货地址：<em>*</em></label></td>
					<td class="ele_content" colspan="3">
						<input name="address" value="{$detail.address}" type="text" id="tel" class="form_ele_text width_400">
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="realname">订单编号：</label></td>
					<td class="ele_content" colspan="3">{$detail.orderno}</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="phone">下单时间：</label></td>
					<td class="ele_content" colspan="3">{$detail.addtime|date="Y-m-d H:i:s",###}</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="realname">订单金额：</label></td>
					<td class="ele_content" colspan="3">￥{$detail.orderfee}</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="sex">服务费：</label></td>
					<td class="ele_content" colspan="3">￥{$detail.shipfee}</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="iccard">实付金额：</label></td>
					<td class="ele_content" colspan="3">￥{$detail.totalfee}</td>
				</tr>
				<tr>
					<td colspan="4" style="height:30px;"></td>
				</tr>
			</table>
		</div>
		<div id="tab1_1" fortab="tab1" class="clearfix" style="display:none;">
			<table cellpadding="0" cellspacing="0" class="module_form" width="600">
				<tr>
					<td class="ele_title">商品名称</td>
					<td class="ele_title">商品单价</td>
					<td class="ele_title">购买数量</td>
					<td class="ele_title">小计</td>
					<td class="ele_title">商品备注</td>
					<td class="ele_title" width="7%">&nbsp;</td>
				</tr>
				
				<volist name="dlist" id="v">
					<tr>
						<td class="">{$v.title}</td>
						<td class="">￥{$v.price}</td>
						<td class="">{$v.amount}</td>
						<td class="">￥{$v.total}</td>
						<td class="">{$v.ask}</td>
						<notempty name="v.detail.gnfr">
						<td class="editAttr" css="isshow" id="{$v.id}"><span class="editbtn">显示属性</span></td>
						</notempty>
					</tr>
					<tr id="tr_{$v.id}" style="display:none">
						<td colspan="5">
							<volist name="v.detail.gnfr" id="vo">
								<div class="attr"><span class="entitle">{$vo.entitle}：</span>
									<volist name="vo.config" id="k">
										<span class="">
											<eq name="vo.type" value="1">
												<input type="radio" value="" id="">{$k.entitle}( Add ￥{$k.mprice} )
											</eq>
											<eq name="vo.type" value="2">
												<input type="checkbox" value="" id="">{$k.entitle}( Add ￥{$k.mprice} )
												<select>
													<for start="1" end="$k.maxnum" >
														<option value="{$i}">{$i}</option>
													</for>
												</select>
											</eq>
											<eq name="vo.type" value="3">
												<input type="radio" value="" id="">{$k.entitle}( Add ￥{$k.mprice} )
											</eq>
										</span>
									</volist>
								</div>
							</volist>
						</td>
					</tr>
				</volist>
				
				<tr>
					<td colspan="6" style="height:30px;"></td>
				</tr>
			</table>
		</div>
		</form>
	</div>
	<div class="page_footer pdtd10">
		<input type="button" name="submit" id="submit" value="提交数据"  class="form_ele_submit"/>
		<input type="reset" name="reset" id="reset" value="清空数据"  class="form_ele_reset"/>
	</div>
</body>
<script type="text/javascript">
	//弹出窗口全局变量
	var api = frameElement.api, W = api.opener;
	$(function(){
		//滑动门
		$('.tabbar li').click(function(){
			var tabname = $('.tabbar>ul').attr('tabname');
			$('.tabbar li').removeClass('tabhover');
			$(this).addClass('tabhover');
			
			$('div[fortab="'+tabname+'"]').hide();
			$('#'+$(this).attr('show')).show();
		});
		
		//表格隔行换色
		$('.module_form tr:odd').addClass('odd');
		$('.module_form tr:even').addClass('even');
		
		//表单操作
		//重置
		$('.form_ele_reset').on('click',function(){
			$('#memberAdd_form').get(0).reset();
		});
		
		$(".editAttr").click(function(){
			var id  = $(this).attr("id");
			var css = $(this).attr("css");
			
			if(css=="isshow"){
				$("#tr_"+id).show();
				$(this).attr("css","ishide");
				$(this).children("span").text("隐藏属性");
			}else{
				$("#tr_"+id).hide();
				$(this).attr("css","isshow");
				$(this).children("span").text("显示属性");
			}
		});
	});
</script>
</html>
